package stud.mpgame.network;

import stud.mpgame.network.MessageDescription;
import stud.mpgame.network.NetworkMonitor;

/**
 * ...
 * @author Timofeev
 */

interface IMessageDispatcher {
    
    function addMessageReceivedListener(listener:Message-> Void):Void;
    
    function addMessageReceivedListenerByDescr(messageDescription:MessageDescription, listener:Message-> Void):Void;
    
    function addResponseMessageReceivedListener(listener:Message-> Void):Void;
    
    function addResponseMessageReceivedListenerByDescr(messageDescription:MessageDescription, listener:Message-> Void):Void;

    function addMessageSentListener(listener:Message-> Void):Void;
    
    function addMessageSentListenerByDescr(messageDescription:MessageDescription, listener:Message-> Void):Void;
    
    function addResponseMessageSentListener(listener:Message-> Void):Void;
    
    function addResponseMessageSentListenerByDescr(messageDescription:MessageDescription, listener:Message-> Void):Void;

    function removeMessageReceivedListener(listener:Message-> Void):Void;
    
    function removeMessageReceivedListenerByDescr(messageDescription:MessageDescription, listener:Message-> Void):Void;
    
    function removeResponseMessageReceivedListener(listener:Message-> Void):Void;
    
    function removeResponseMessageReceivedListenerByDescr(messageDescription:MessageDescription, listener:Message-> Void):Void;

    function removeMessageSentListener(listener:Message-> Void):Void;
    
    function removeMessageSentListenerByDescr(messageDescription:MessageDescription, listener:Message-> Void):Void;
    
    function removeResponseMessageSentListener(listener:Message-> Void):Void;
    
    function removeResponseMessageSentListenerByDescr(messageDescription:MessageDescription, listener:Message-> Void):Void;
    
}